package com.abc.tacos.bean;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;

/**
 * @author Kar
 * @create 2022-04-13 下午4:41
 */
@Data
public class Taco {
    private Long id;
    private Date createdAt;
    @NotNull
    @Size(min=5, message = "Name must be at least 5 characters long")
    private String name;
    /**
     * 改用 Ingredient类型
     * @Size(min=1, message = "You must choose at least 1 ingredient")
     * private List<String> ingredients;
     */
    @Size(min=1, message = "You must choose at least 1 ingredient")
    private List<Ingredient> ingredients;

}
